<template>
	<u-popup :show="show" mode="center" :closeable="true" @close="close" round="30rpx" bgColor="transparent">
		<view class="noticeStyle">
			<view class="header">{{obj.title || '公告'}}</view>
			<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y">
				<rich-text :nodes="obj.content" style="color: #FFFFFF;"></rich-text>
			</scroll-view>
		</view>
	</u-popup>
</template>

<script>
	import {
		annOunSee
	} from '@/api/my.js'
	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				scrollTop: 0,
				obj: {}
			}
		},
		methods: {
			async getNone(id) {
				let res = await annOunSee({
					id: id
				})
				this.obj = res.data
			},
			close() {
				this.$emit('success')
			},
			setNone(data){
				this.obj = data
			}
		}
	}
</script>

<style scoped>
	.header {
		font-size: 35rpx;
		color: #FFFFFF;
		font-weight: bold;
		opacity: 0.8;
	}

	.scroll-Y {
		margin-top: 30rpx;
		width: 650rpx;
		max-height: calc(100vh - 400rpx);
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	.noticeStyle {
		width: 650rpx;
		max-height: calc(100vh - 400rpx);
		display: flex;
		flex-direction: column;
		align-items: center;
		border-radius: 30rpx;
		background-color: #1D283A;
		padding: 25rpx 30rpx 30rpx 30rpx;
		box-sizing: border-box;
	}
</style>